package com.lhdx.practical.bean;

import com.lhdx.practical.utils.IDGenerator;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 部门实体
 */
@Entity
@Table(name="depart")
public class Depart {
    @Id
    private long id;

    private long pid;

    private String pidname;
    /**
     * 部门名称
     */
    private String departname;
    /**
     * 排序
     */
    private int sort;
    /**
     * 等级
     */
    private int level;

    public Depart(){}

    public Depart(long pid,String pidname,String departname,int sort,int level){
        this.id = IDGenerator.getID();
        this.pid = pid;
        this.pidname = pidname;
        this.departname = departname;
        this.sort = sort;
        this.level = level;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getPid() {
        return pid;
    }

    public void setPid(long pid) {
        this.pid = pid;
    }

    public String getDepartname() {
        return departname;
    }

    public void setDepartname(String departname) {
        this.departname = departname;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getPidname() {
        return pidname;
    }

    public void setPidname(String pidname) {
        this.pidname = pidname;
    }
}
